package mc.web.propertyeditors;

import java.beans.PropertyEditorSupport;

import mc.domain.Alergen;
import mc.domain.Alergen_na_karcie;
import mc.domain.AlergenGrupa;



public class TestEditor extends PropertyEditorSupport {

	@Override
	public String getAsText() {
		return String.valueOf(((Alergen_na_karcie)getValue()).getId()); 
	}

	@Override
	public void setAsText(String text) throws IllegalArgumentException {
		setValue(new Alergen_na_karcie(new Alergen("alergen z setastext", new AlergenGrupa("grupa2"),"3"))); //TODO dao pobieranie Alergenu po ID
	}
	
	

	
	
}
